import cv2
from PyQt5.QtGui import QImage, QPixmap

def cv2_to_qpixmap(image):
    """
    Convert a cv2 BGR image to a QPixmap using the same parameters.
    """
    image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
    height, width, channels = image_rgb.shape
    bytes_per_line = 3 * width
    q_image = QImage(image_rgb.data, width, height, bytes_per_line, QImage.Format_RGB888)
    return QPixmap.fromImage(q_image)
